//
//  ArrayExtension.swift
//  MTCategory
//
//  Created by ooops on 2019/12/16.
//  Copyright © 2019 张强. All rights reserved.
//

import Foundation

// MARK: - String
public extension Array where Element == String {
    func sortedKeys() -> [Element] {
        var array = self.sorted(by: { (str1, str2) -> Bool in
            return str1 < str2
        })
        if let first = array.first {
            if first == "#" {
                array.removeFirst()
                array.append(first)
            }
        }
        return array
    }

}
